﻿<Window x:Class="CSSAdriverapp.AddVehicle"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Add Vehicle" Height="264" Width="286" xmlns:my="clr-namespace:CSSAdriverapp" ResizeMode="NoResize" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico">
    <Grid Background="#C5AFB1AF">
        <Label Content="Vehicle Name:" Height="28" HorizontalAlignment="Left" Margin="12,25,0,0" Name="vehicleNameLabel" VerticalAlignment="Top" />
        <Label Content="Vehicle Type:" Height="28" HorizontalAlignment="Left" Margin="19,59,0,0" Name="vehicleTypeLabel" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="104,25,0,0" Name="vehicleNameTextbox" VerticalAlignment="Top" Width="120" />
        <Button Content="Add Vehicle" Height="23" HorizontalAlignment="Left" Margin="149,168,0,0" Name="addVehicleButton" VerticalAlignment="Top" Width="75" Click="Addvehicle_Click" />
        <ListBox Height="100" HorizontalAlignment="Left" Margin="104,59,0,0" Name="vehicleTypeListbox" VerticalAlignment="Top" Width="120" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:AddVehicle, AncestorLevel=1}, Path=types}" ItemsSource="{Binding Path=Name}" />
        <Label Content="Vehicle Added Successfully" Height="28" HorizontalAlignment="Left" Margin="104,191,0,0" Name="vehicleAddedSuccessfullyLabel" VerticalAlignment="Top" Foreground="#FF489719" Visibility="Hidden" />
        <Label Content="Vehicle Name Already Exists" Height="28" HorizontalAlignment="Left" Margin="93,191,0,0" Name="vehicleNameAlreayExists" VerticalAlignment="Top" Foreground="#FFF20909" Visibility="Hidden" />
        <Label Content="Fields are missing" Height="28" HorizontalAlignment="Left" Margin="93,191,0,0" Name="missingFieldsLabel" VerticalAlignment="Top" Width="159" Foreground="#FFFA1313" Visibility="Hidden" />
    </Grid>
</Window>
